home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1176_creating_nib_modules.rtf < prev    next >
Text File  |  1995-06-12  |  2KB  |  21 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\fmodern Ohlfs;}
  2. \paperw9840
  3. \paperh8400
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red83\green83\blue83;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc1\cf1 Q:  How do I create a nib module that is owned by something other than a subclass of application or a subclass of object?\
  8. \
  9. A: When you create a new module, InterfaceBuilder prompts you to choose what is going to own it:  a subclass of object or a subclass of application.  If you had planned for the owner to be one of those two, that works well.  But what if you want the nib module to be owned by a subclass of a subclass of Object or by a subclass of Control or any other class in your class hierarchy?  When you first create the new nib module, go ahead and indicate to InterfaceBuilder that you want it to be owned by some subclass of Object.  We will change it later.  Add the class you want as the owner to your class hierarchy.  Select the File's Owner icon in the nib window of InterfaceBuilder (the small window with the icons in the lower left corner of screen).  Choose Attributes from the Inspector panel pop-up list.  There is a scrolling list of custom classes—select your custom class from the list and click "OK."  You've done it!\
  10. \
  11. Note that in NEXTSTEP Release 3 your custom class is automatically selected once you click a selection from the list. The "OK" button has been removed. \
  12. \
  13. See also IB_file_owner (ib.510).\
  14. \
  15. QA511\
  16. \
  17. Valid for 1.0,  2.0, 3.0\
  18. \
  19. \
  20.  
  21.